home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / AMIGA / AMICUS / AMIBEST1.ADF / AmigaBasicStuff / WaveForm / Load Demo < prev    next >
Text File  |  1987-07-22  |  512b  |  21 lines

  1. ' demonstration routine for loading waveforms
  2. ' use the name of your file in filename$
  3.  
  4. DIM wav%(256)                      'integer array.
  5. ON ERROR GOTO badfile              'if there's an error
  6. CLOSE #1                           'just in case.
  7. OPEN filename$ FOR INPUT AS #1
  8. FOR i=1 TO 256                     'get 256 elements.
  9.    INPUT #1,x
  10.    wav%(i)=x
  11. NEXT x   
  12.  
  13. badfile:                           
  14.  
  15. 'You can insert any error handlers here
  16.  
  17. CLOSE #1
  18. IF ERR<>0 THEN PRINT "Error ";ERR;" in waveform read."
  19.  
  20.  
  21.